//
//  RefundSuccessViewController.m
//  renmingongshe
//
//  Created by macbook on 2017/11/1.
//  Copyright © 2017年 xiaodian. All rights reserved.
//

#import "RefundSuccessViewController.h"
#import "ConsultDetailViewController.h"

@interface RefundSuccessViewController ()
@property (weak, nonatomic) IBOutlet UILabel *sucLab;
@property (weak, nonatomic) IBOutlet UILabel *shopName;
@property (weak, nonatomic) IBOutlet UILabel *money;
@property (weak, nonatomic) IBOutlet UILabel *reason;
@property (weak, nonatomic) IBOutlet UILabel *time;

@end

@implementation RefundSuccessViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.titleLabel.text = @"处理结果";
    [self showInfo];
}
- (IBAction)toConsult:(id)sender {
    ConsultDetailViewController *consult = [[ConsultDetailViewController alloc] init];
    consult.data = _data;
    [self.navigationController pushViewController:consult animated:YES];
}
- (void)showInfo
{
    if (_isSuc) {
        _sucLab.text = @"退款成功";
        _time.text = [TXUtilsString IsNull:_data[@"refundTime"]]?@"":_data[@"refundTime"];
    }else{
        _sucLab.text = @"退款失败";
        _time.text = @"";
    }
    _money.text = [NSString stringWithFormat:@"%@元", _data[@"backMoney"]];
    _reason.text = _data[@"datas"][@"dataName"];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
